<template>
    <div class="flex-row-center base-size mb20 pointer">
        <a class="home_icon" href="https://zhyq.ailuquan.cn/website/shijzslqqzf">首页</a>
        <span class="ml5 mr5">></span>
        <span @click="proxy.routerBackMixin" class="base-color">人才招聘</span>
        <span class="ml5 mr5">></span>
        <span class="">详情</span>
    </div> 
    <div>
        <div class="mb10 flex-row al-flex-end">
            <span class="size28 weight mr20">{{detail.name||''}}</span>
            <span><span class="base-color large-size">{{detail.salary_start}}～{{detail.salary_end}}</span> 元/月</span>
        </div>
        <div class="flex-row-center">
            <span>{{detail.working_duration_start}}～{{detail.working_duration_end}}年</span>
            <div class="line-h ml10 mr10" style="height:12px;"></div>
            <span>{{proxy.$utils.findObj(detail.edu,globalData.eduList,'value').text}}</span>
            <span class="state-btn-primary ml20">{{+detail.nature?'兼职':'全职'}}</span>
        </div>
        <div class="label mt30 mb10 weight">岗位职责：</div>
        <div>
            {{detail.responsibilities||""}}
        </div>
        <div class="label mt30 mb10 weight">任职要求：</div>
        <div>
            {{detail.requirement||""}}
        </div>
    </div>
</template>
<script setup>
    import { reactive,ref,getCurrentInstance,toRaw,inject,toRefs } from 'vue'
    let { proxy } = getCurrentInstance()
    let obj = reactive({
        detail:{
            id: proxy.$route.query.id
        }
    })

    let init = ()=>{
        proxy.$ajax({url: 'jobs/get',data:{job_id: obj.detail.id},bfLoading: true}).then(d => {
            if(d.success){
                obj.detail = {
                    ...d.msg,
                    id: obj.detail.id
                }
            }else{}
        }).catch(e => {
            console.log(e)
            if(e == "登录已过期，请重新登录"){
                proxy.routerPushMixin('/')
            }
        })
    }
    init()

    let { detail } = toRefs(obj)
</script>

<style lang="scss" scoped>
</style>